package com.hexiang.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hexiang.HelloService;

@Controller
public class HelloController {
    @Autowired
    private HelloService helloService;

    @RequestMapping(value = "/sayHello")
    @ResponseBody
    public String sayHello(String name) {
        System.out.println(helloService.sayHello(name));
        return helloService.sayHello(name);
    }
}
